
<?php include_once 'inc_modules_path.php'; ?>
<form class="form-inline" action="<?php echo site_urlc($this->class.'/index/'.$this->cid); ?>" method="GET">
    <span>姓名:</span>
    <input type="text" class="" name="uname"
           value="<?php echo $this->input->get('uname') ?>">
    <span>手机号:</span>
    <input type="text" class="" name="phone"
           value="<?php echo $this->input->get('phone') ?>" maxlength="11">
    <span>订单号:</span>
    <input type="text" class="" name="payment_sn"
           value="<?php echo $this->input->get('payment_sn') ?>">
    <span>类型:</span>
<!--  1 赞赏支出 2 赞赏收入 3 悬赏发布押金 4 指派补差价 5 悬赏收入 6 悬赏全额退回 7 悬赏差价退回 8 提现 9 充值  -->
    <select name="type">
        <option value="" >请选择</option>
        <option value="1" <?php echo $this->input->get('type') == 1 ? 'selected' : '' ?> >赞赏支出</option>
        <option value="2" <?php echo $this->input->get('type') == 2 ? 'selected' : '' ?>>赞赏收入</option>
        <option value="3" <?php echo $this->input->get('type') == 3 ? 'selected' : '' ?>>悬赏发布押金</option>
        <option value="4" <?php echo $this->input->get('type') == 4 ? 'selected' : '' ?>>指派补差价</option>
        <option value="5" <?php echo $this->input->get('type') == 5 ? 'selected' : '' ?>>悬赏收入</option>
        <option value="6" <?php echo $this->input->get('type') == 6 ? 'selected' : '' ?>>悬赏全额退回</option>
        <option value="7" <?php echo $this->input->get('type') == 7 ? 'selected' : '' ?>>悬赏差价退回</option>
        <option value="8" <?php echo $this->input->get('type') == 8 ? 'selected' : '' ?>>提现</option>
        <option value="9" <?php echo $this->input->get('type') == 9 ? 'selected' : '' ?>>充值</option>
    </select>
    <span>支付方式:</span>
<!--    1 微信 2 支付宝 3 余额-->
    <select name="pay_ways">
        <option value="">请选择</option>
        <option value="1" <?php echo $this->input->get('pay_ways') == 1 ? 'selected' : '' ?> >微信</option>
        <option value="2" <?php echo $this->input->get('pay_ways') == 2 ? 'selected' : '' ?>>支付宝</option>
        <option value="3" <?php echo $this->input->get('pay_ways') == 3 ? 'selected' : '' ?>>余额</option>
    </select>
    <input class="btn" type="submit" value="检索">
</form>
<p></p>

<div class="clearfix"><p></p></div>
<div class="boxed">
    <div class="boxed-inner seamless">

<table class="table table-striped table-hover select-list">
    <thead>
        <tr>
            <th class="width-small"><input id='selectbox-all' type="checkbox" > </th>
            <th>用户名</th>
            <th>手机号</th>
            <th>说明</th>
            <th>类型</th>
            <th>状态</th>
            <th>支付方式</th>
            <th>金额</th>
            <th>支付单号</th>
            <th>创建时间</th>
            <th>支付时间</th>
            <th class="span1">操作</th>
        </tr>
    </thead>
    <tbody class="sort-list">
        <?php foreach ($list as $v):?>
        <tr data-id="<?php echo $v['id'] ?>" data-sort="<?php echo $v['sort_id'] ?>">
            <td><input class="select-it" type="checkbox" value="<?php echo $v['id']; ?>" ></td>
            <td> <?php echo $v['uname'].'('.$v['uid'].')' ?></td>
            <td> <?php echo $v['phone'] ?></td>
            <td> <?php echo $v['title'] ?></td>
            <td> <?php echo $v['type'] ?></td>
            <td> <?php echo $v['status'] ?></td>
            <td> <?php echo $v['pay_ways'] ?></td>
            <td> <?php echo $v['money'] ?></td>
            <td> <?php echo $v['payment_sn'] ?></td>
            <td> <?php echo  date("Y/m/d H:i:s",$v['created_at']); ?> </td>
            <td> <?php echo  date("Y/m/d H:i:s",$v['pay_time']); ?> </td>
            <td>
                <div class="btn-group">
                    <a class='btn btn-small' href=" <?php echo site_urlc( $this->router->class.'/edit/'.$v['id']) ?> " title="<?php echo lang('edit') ?>"> <i class="fa fa-pencil"></i> <?php // echo lang('edit') ?></a>
                </div>
            </td>
        </tr>
        <?php endforeach;?>
    </tbody>
</table>

    </div>
</div>


<?php echo $pages; ?>

<script>
require(['adminer/js/ui'],function(ui){
  var balance = {
    url_del: "<?php echo site_urlc('balance/delete'); ?>"
    ,url_audit: "<?php echo site_urlc('balance/audit'); ?>"
    ,url_flag: "<?php echo site_urlc('balance/flag'); ?>"
//    ,url_sortid: "<?php //echo site_urlc('balance/sortid'); ?>//"
  };

  ui.fancybox_img();
  ui.btn_delete(balance.url_del);     // 删除
  ui.btn_audit(balance.url_audit);    // 审核
  ui.btn_flag(balance.url_flag);      // 推荐
//  ui.sortable(balance.url_sortid);    // 排序
});
</script>
